package com.suli.multimedia.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.suli.multimedia.enums.Status;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author SuLi
 * @since 2022-04-04
 */

@Data
@EqualsAndHashCode()
@ToString
@TableName("user_ticket")
public class UserTicket implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单id
     */
    @TableId(value = "id",type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 用户id
     */
    @TableField("user_id")
    private String userId;

    /**
     * 单张门票id
     */
    @TableField("ticket_id")
    private String ticketId;

    /**
     * 门票名称
     */
    @TableField("ticket_name")
    private String ticketName;

    /**
     * 购票时间
     */
    @TableField(value = "ticket_buy_time",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date ticketBuyTime;

    /**
     * 过期时间
     */
    @TableField("ticket_expire_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date ticketExpireTime;

    /**
     * 门票状态
     */
    @TableField(value = "ticket_status",fill = FieldFill.INSERT)
    private Status ticketStatus;

    /**
     * 门票价格
     */
    @TableField("ticket_price")
    private BigDecimal ticketPrice;

}
